<extend name="CarBase" />
<block name="body">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/Car/Calculator/jijia.css" media="all">
    <script type="text/javascript" src="__PUBLIC__/js/Car/Calculator/jquery-1.8.0.min.js"></script>

    <input id="hidCarID" type="hidden">
    <input id="startCalUrl" type="hidden">

    <div id="container">

        <!-------页签导航开始------>
        <div class="first-tags">
            <ul>
                <li class="current"><a id="quankuanUrl" href="{:U('Calculator/PaidInFull1')}"><span>全款计算</span></a></li>
                <li><a id="daikuanUrl" href="{:U('Calculator/Loan1')}"><span>贷款计算</span></a></li>
                <li><a id="baoxianUrl" href="{:U('Calculator/Insurance1')}"><span>保险计算</span></a></li>
            </ul>
        </div>
        <!-----页签导航结束-------->
        <div class="m_height">
            <div id="topLayer" class="top_layer">请输入裸车价格</div>
            <div class="xj-form">
                <!--<a href="" class="xj-change-city">-->
                    <!--<span>选择车款</span>-->
                    <!--<strong id="select_carname"></strong>-->
                <!--</a>-->

                <div class="xj-user-info-box">
                    <div class="xj-user-info">
                        <span>裸车价格</span>
                        <input id="luochePrice" type="number" class="current">
                    </div>
                </div>
            </div>
            <script type="text/javascript">
                $(function () {
                    $(function () {
                        $("#luochePrice").on("keyup input", function () {
                            var carPrice = $(this).val();
                            if (carPrice.length > 8) {
                                $(this).val(carPrice.substr(0, 8));
                            }
                        });
                    });
                });
            </script>
            <div class="m-jsq-btn-box">
                <a id="startCal" href="javascript:void(0)" class="btn-one btn-orange">开始计算</a>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        var oldCarPrice = 0;

        $(function () {

            $("#startCal").on("click", function () {
                var luochePrice = GetIntValue($("#luochePrice").val());

                location.href = "/index.php/?m=Calculator&a=PaidInFull&carprice=" + luochePrice;
            });
        });

        //4.784->4784
        function GetIntValue(num) {
            num = num.toString().replace(/\,/g, '');
            return parseInt(num);
        }
    </script>


</block>